package com.zh.ssmshirofreemarker.config;

import com.zh.ssmshirofreemarker.cache.ShiroCacheManager;
import org.springframework.beans.factory.config.MethodInvokingFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringBootConfig {

    @Bean
    public MethodInvokingFactoryBean methodInvokingFactoryBean(ShiroCacheManager shiroCacheManager){
        MethodInvokingFactoryBean methodInvokingFactoryBean = new MethodInvokingFactoryBean();
        methodInvokingFactoryBean.setStaticMethod("com.zh.ssmshirofreemarker." +
                "Utils.ShiroAuthorizationHelper." +
                "setCacheManager");
        methodInvokingFactoryBean.setArguments(shiroCacheManager);
        return methodInvokingFactoryBean;
    }

}
